$OpenBSD: patch-CMakeLists_txt,v 1.3 2013/08/16 10:06:14 sthen Exp $

* do not install the man below share
* do not install configuration file in /etc directly
* install binaries to sbin

--- CMakeLists.txt.orig	Sat Jun 11 14:17:44 2011
+++ CMakeLists.txt	Thu Aug 15 15:16:05 2013
@@ -9,8 +9,7 @@ file(WRITE src/transport_config.h "\n")
  
 set(CMAKE_MODULE_PATH "cmake_modules")
 include_directories(src)
- 
- 
+
 set(gloox_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 find_package(gloox REQUIRED)
 set(purple_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
@@ -147,7 +146,7 @@ ADD_CUSTOM_TARGET (man ALL ${PYTHON_EXECUTABLE} ${CMAK
 
 
 INSTALL(TARGETS spectrum
-    RUNTIME DESTINATION bin
+    RUNTIME DESTINATION sbin
     )
 
 
@@ -155,7 +154,8 @@ INSTALL(TARGETS spectrum
 INSTALL(FILES
 	${CMAKE_CURRENT_SOURCE_DIR}/spectrum.cfg
 	RENAME spectrum.cfg.example
-	DESTINATION /etc/spectrum
+	DESTINATION share/examples/spectrum
+	PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ
 	)
 
 if (NOT WITHOUT_SPECTRUMCTL)
@@ -167,7 +167,7 @@ INSTALL(DIRECTORY
 
 INSTALL(FILES
 	${CMAKE_CURRENT_SOURCE_DIR}/spectrumctl/spectrumctl.py
-    DESTINATION bin
+    DESTINATION sbin
     PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
     RENAME spectrumctl
     PERMISSIONS OWNER_EXECUTE OWNER_READ GROUP_EXECUTE GROUP_READ
@@ -176,11 +176,11 @@ INSTALL(FILES
 
 INSTALL(FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/man/spectrumctl.8
-	DESTINATION share/man/man8
+	DESTINATION man/man8
     )
 INSTALL(FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/man/spectrum.cfg.5
-	DESTINATION share/man/man5
+	DESTINATION man/man5
     )
 
 endif (NOT WITHOUT_SPECTRUMCTL)
